import request from '/@/utils/request';

//---- 酒藏管理 -----

// 酒藏监控
// 列表
export const fetchMonitoringList =  (data?: object) => {
	return request({
		url: '/certificate/getMonitorPage',
		method: 'post',
		data,
	});
}

// 导出
export const fetchMonitoringExport =  (data?: object) => {
	return request({
		url: '/certificate/exportMonitor',
		method: 'post',
		data,
		responseType: "blob",
	});
}


// 酒藏集市
// 出售列表
export const fetchMarketSellList =  (data?: object) => {
	return request({
		url: '/certificate/getMarketSellPage',
		method: 'post',
		data,
	});
}

// 出售导出
export const fetchMarketSellExport =  (data?: object) => {
	return request({
		url: '/certificate/exportMarketSell',
		method: 'post',
		data,
		responseType: "blob",
	});
}

// 求购列表
export const fetchMarketWantList =  (data?: object) => {
	return request({
		url: '/certificate/getMarketWantPage',
		method: 'post',
		data,
	});
}

// 求购导出
export const fetchMarketWantExport =  (data?: object) => {
	return request({
		url: '/certificate/exportMarketWant',
		method: 'post',
		data,
		responseType: "blob",
	});
}



// 获取规则配置
export const fetchMarketRuleInfo = () => {
	return request({
		url: '/certificate/getMarketRule',
		method: 'post',
		data:{},
	});
};

// 规则配置
export const fetchMarketRule = (data:any) => {
	return request({
		url: '/certificate/configMarketRule',
		method: 'post',
		data,
	});
};

// 下架
export const fetchMarketStatus = (data:any) => {
	return request({
		url: '/certificate/deListing',
		method: 'post',
		data,
	});
};

// 酒藏赠送
// 列表
export const fetchBestowList =  (data?: object) => {
	return request({
		url: '/certificate/getGivePage',
		method: 'post',
		data,
	});
}

// 酒藏赠送导出
export const fetchBestowExport =  (data?: object) => {
	return request({
		url: '/certificate/exportGive',
		method: 'post',
		data,
		responseType: "blob",
	});
}

// 酒藏提货
// 列表
export const fetchPickUpList =  (data?: object) => {
	return request({
		url: '/certificate/getShippingPage',
		method: 'post',
		data,
	});
}

// 提货导出
export const fetchPickUpExport =  (data?: object) => {
	return request({
		url: '/certificate/exportShipping',
		method: 'post',
		data,
		responseType: "blob",
	});
}






